package com.partners.model;

import javax.validation.constraints.Min;

/**
 * 保存分页参数的类
 *
 * @author xwencong@163.com
 * @date 2018/7/2 15:57
 */
public class Paging {

    /** 页码 */

    @Min(value = 1, message = "page不能小于1")
    private Integer page = 1;

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getRows() {
        return rows;
    }

    public void setRows(Integer rows) {
        this.rows = rows;
    }

    /** 每页记录条数 */

    @Min(value = 1, message = "rows不能小于1")
    private Integer rows = 10;

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Paging{");
        sb.append("page=").append(page);
        sb.append(", rows=").append(rows);
        sb.append('}');
        return sb.toString();
    }
}
